core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
crypto :: Cipher :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).crypto :: RepeatingKeyXorCipher
XOR cipher where the key is repeated to match the length of the message.
# Base class to modelize cryptographic ciphers
abstract class Cipher
# Encrypted data
var ciphertext = new Bytes.empty is writable
# Unencrypted data
var plaintext = new Bytes.empty is writable
# Encrypt plaintext and populate `self.ciphertext`
fun encrypt is abstract
# Decrypt ciphertext and populate `self.plaintext`
fun decrypt is abstract
end
lib/crypto/xor_ciphers.nit:50,1--65,3