protected static byte[] getBytes(final char[] data, String charset) { return SVNEncodingUtil.getBytes(data, charset); }
private SVNPropertyValue(char[] propertyValue, String encoding) { myData = SVNEncodingUtil.getBytes(propertyValue, encoding == null ? "UTF-8" : encoding); }
public byte[] buildChallengeResponse(byte[] challenge) throws IOException { byte[] password = SVNEncodingUtil.getBytes(myCredentials.getPasswordValue(), "UTF-8"); byte[] secret = new byte[64]; Arrays.fill(secret, (byte) 0);
public String authenticate() { if (getUserName() == null || getPassword() == null) { return null; } StringBuffer result = new StringBuffer(); final ByteArrayStream bos = new ByteArrayStream(); try { bos.write(SVNEncodingUtil.getBytes(getUserName().toCharArray(), myCharset)); bos.write(SVNEncodingUtil.getBytes(new char[] {':'}, myCharset)); bos.write(SVNEncodingUtil.getBytes(getPassword(), myCharset)); } catch (IOException e) { // } result.append("Basic "); byte[] bytes = bos.toByteArray(); try { result.append(SVNBase64.byteArrayToBase64(bos.toByteArray())); } finally { SVNEncodingUtil.clearArray(bos.getBuffer()); SVNEncodingUtil.clearArray(bytes); } return result.toString(); }
byte[] rawUserName = userName == null ? null : userName.getBytes("UTF-8"); int rawUserNameLength = userName == null ? 0 : rawUserName.length; rawPassword = SVNEncodingUtil.getBytes(password, "UTF-8");
IntByReference itemId = new IntByReference(); final byte[] utf8Password = SVNEncodingUtil.getBytes(password, "UTF-8"); Memory passwordData = null; int result;
ISVNWinCryptLibrary.DATA_BLOB dataOut = null; try { dataIn = new ISVNWinCryptLibrary.DATA_BLOB(SVNEncodingUtil.getBytes(rawData, "UTF-8")); dataIn.write(); dataOut = new ISVNWinCryptLibrary.DATA_BLOB(null);
context.write(); final byte[] keyringUTF8Password = SVNEncodingUtil.getBytes(keyringPassword, "UTF-8"); Memory passwordData = null; try {