use of org.cloudfoundry.credhub.entity.EncryptedValue in project credhub by cloudfoundry-incubator.
the class ValueCredentialVersionTest method beforeEach.
@Before
public void beforeEach() {
canaryUuid = UUID.randomUUID();
encryptor = mock(Encryptor.class);
byte[] encryptedValue = "fake-encrypted-value".getBytes();
byte[] nonce = "fake-nonce".getBytes();
final EncryptedValue encryption = new EncryptedValue(canaryUuid, encryptedValue, nonce);
when(encryptor.encrypt("my-value")).thenReturn(encryption);
when(encryptor.decrypt(encryption)).thenReturn("my-value");
subject = new ValueCredentialVersion("Foo");
}
Aggregations