Does anyone know what is the equivalent of this java code in swift 2.3
ByteBuffer tmpCounter = ByteBuffer.wrap(byteCounter);
System.out.println(tmpCounter.getLong());
Does anyone know what is the equivalent of this java code in swift 2.3
ByteBuffer tmpCounter = ByteBuffer.wrap(byteCounter);
System.out.println(tmpCounter.getLong());
I would like to know how I can.
I have a code in java
byte[] key24 = [-17, 55, 99, -54, -20, -99, -79, -34, -123, -100, -118, -42, -111, -108, -62, 123, -17, 55, 99, -54, -20, -99, -79, -34];
byte[] data = [-1, -1, -1, 0, 6, 0, 34, 96];
String algorithm = "DESede";
String mode = "DESede/ECB/NoPadding";
KeySpec confKey = new DESedeKeySpec(key24);
SecretKeyFactory spcKey = SecretKeyFactory.getInstance(algorithm);
Cipher cifermode = Cipher.getInstance(mode);
SecretKey secretKey = spcKey.generateSecret(confKey);
output = cifermode.doFinal(data);
System.err.println("cifrado: "+output);
resultado: [-101, 23, 28, -119, -62, -119, -18, 57]
Does anyone know how I can do the same but in objective C or swift 2.3
Thanks for your time.
Hi, it's TripleDES encryption.
I have a variable nsdata
that is a byte array, and I want it as a string in string, but I don't want to decode it, I just want to have the same frame but in string.
nsdata = <024101e6 90eaf082 01e0df42 020002df 3d106967 e83efea5 c7bfe062 dca4737b 101bdf16 088c9877>
and I want to have it exactly the same but as a string:
nsstring = "<024101e6 90eaf082 01e0df42 020002df 3d106967 e83efea5 c7bfe062 dca4737b 101bdf16 088c9877>";
How could I do it?