byte[] alteredCiphertext = Arrays.clone(originalCiphertext); alteredCiphertext[8] = (byte) (alteredCiphertext[8] ^ 0x08); // <<< Change 100$ to 900$
/** * Return the secret associated with this spec. * * @return a copy of the secret. */ public byte[] getSecret() { return Arrays.clone(secret); }
public DecryptedPOP(BodyPartID bodyPartID, AlgorithmIdentifier thePOPAlgID, byte[] thePOP) { this.bodyPartID = bodyPartID; this.thePOPAlgID = thePOPAlgID; this.thePOP = Arrays.clone(thePOP); }
/** * Return the encoded string as a byte array. * * @return the actual bytes making up the encoded body of the T61 string. */ public byte[] getOctets() { return Arrays.clone(string); }
/** * Return a byte array representation of our contained String. * * @return a byte array representing our contents. */ public byte[] getOctets() { return Arrays.clone(string); }
/** * Return the nonce (IV) value to be associated with message. * * @return block cipher IV for message. */ public byte[] getNonce() { return Arrays.clone(nonce); }
public Gost2814789KeyWrapParameters(ASN1ObjectIdentifier encryptionParamSet, byte[] ukm) { this.encryptionParamSet = encryptionParamSet; this.ukm = Arrays.clone(ukm); }
public ECCCMSSharedInfo( AlgorithmIdentifier keyInfo, byte[] suppPubInfo) { this.keyInfo = keyInfo; this.entityUInfo = null; this.suppPubInfo = Arrays.clone(suppPubInfo); }
public MessageImprint( AlgorithmIdentifier hashAlgorithm, byte[] hashedMessage) { this.hashAlgorithm = hashAlgorithm; this.hashedMessage = Arrays.clone(hashedMessage); }
public X931SecureRandomBuilder setDateTimeVector(byte[] dateTimeVector) { this.dateTimeVector = Arrays.clone(dateTimeVector); return this; }
/** * Set the personalization string for DRBG SecureRandoms created by this builder * @param personalizationString the personalisation string for the underlying DRBG. * @return the current builder. */ public SP800SecureRandomBuilder setPersonalizationString(byte[] personalizationString) { this.personalizationString = Arrays.clone(personalizationString); return this; }
/** * Gives the signature of the whole body. Type of signature is given in * the Iso7816CertificateBody.Iso7816PublicKey.ASN1ObjectIdentifier * * @return the signature of the body. */ public byte[] getSignature() { return Arrays.clone(signature); }
/** * Return the associated data associated with this parameter spec. * * @return the associated data, null if there isn't any. */ public byte[] getAssociatedData() { return Arrays.clone(associatedData); }
public byte[] getEncoding() { return Arrays.clone(time); } }
/** * Base constructor. * * @param id the ID string associated with this usage of SM2. */ public XiSM2ParameterSpec(byte[] id) { if (id == null) { throw new NullPointerException("id string cannot be null"); } this.id = Arrays.clone(id); }
protected byte[] engineGenerateSecret() throws IllegalStateException { byte[] rv = Arrays.clone(shared); Arrays.fill(shared, (byte)0); return rv; }
/** * Obtains the value of the {@link #PARAM_TYPE_KEY_IDENTIFIER key identifier parameter}, or * <code>null</code> if not set. */ public byte[] getKeyIdentifier() { return Arrays.clone((byte[])parameters.get(Integers.valueOf(PARAM_TYPE_KEY_IDENTIFIER))); }
public void init(CipherParameters params) { secret = Arrays.clone(((KeyParameter)params).getKey()); reset(); }
private DSTU4145ParameterSpec(ECDomainParameters parameters, ECParameterSpec ecParameterSpec, byte[] dke) { super(ecParameterSpec.getCurve(), ecParameterSpec.getGenerator(), ecParameterSpec.getOrder(), ecParameterSpec.getCofactor()); this.parameters = parameters; this.dke = Arrays.clone(dke); }