我使用Facebook SDK和FBLoginView
登录Facebook,我得到了一个基本的用户信息,但我需要更多的权限,如email
,birthday
.如何添加权限?
我在可编辑模式下创建tableview所有tableview行都包含( - )符号,但我需要一些单元格不在可编辑模式下,如果有可能,谢谢
嗨,我正在 android 和 swift 中开发应用程序,在 android 中使用加密
public static String Encrypt(String text, String key)
throws Exception {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
byte[] keyBytes= new byte[16];
byte[] b= key.getBytes("UTF-8");
int len= b.length;
if (len > keyBytes.length) len = keyBytes.length;
System.arraycopy(b, 0, keyBytes, 0, len);
SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);
cipher.init(Cipher.ENCRYPT_MODE,keySpec,ivSpec);
byte[] results = cipher.doFinal(text.getBytes("UTF-8"));
BASE64Encoder encoder;
encoder = new BASE64Encoder();
return encoder.encode(results);
}
Run Code Online (Sandbox Code Playgroud)
和服务器端使用 RIJnadal 算法来获取它,但快速端我使用的是 Cryptoswift 库
let key = privateKey // length == …
Run Code Online (Sandbox Code Playgroud)